<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Dom</title>
		<script src="../../py/system.js" type="text/javascript"></script>
		<script src="../../py/system/dom/element.js" type="text/javascript"></script>
		
		<script src="../../common/project/project.js" type="text/javascript"></script>
		<script src="../../common/assets/scripts/default.js" type="text/javascript"></script>
		<script src="../../common/assets/scripts/debug.js" type="text/javascript"></script>
	</head>
	<body> 
		down: <input type="text" id="a">
		press: <input type="text" id="d">
		<span id="span"></span>
		<script>

			$('a').on('keydown', function(e){
				trace(e);
				this.value = String.fromCharCode(e.which);
				
				$('span').append(e.which + '(' + String.fromCharCode(e.which) + ')', true);
				return false;
			});
			
			
			$('d').on('keypress', function(e){
				trace(e);
				this.value = String.fromCharCode(e.which);
				
				$('span').append(e.which + '(' + String.fromCharCode(e.which) + ')', true);
				return false;
			});
		</script>
	</body>
</html>